package cn.dwj.hadoop.rpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.Server;

import java.io.IOException;


/**
 * Created by DINGWJ5 on 2017-12-21.
 */
public class Starter {
    public static void main(String[] args) throws IOException {
        RPC.Builder builder = new RPC.Builder(new Configuration());
        builder.setBindAddress("192.168.110.149");
        builder.setPort(1000);
        builder.setProtocol(LoginServiceInterface.class);
        builder.setInstance(new LoginServiceImpl());
        Server server = builder.build();

        server.start();
    }
}
